package com.ruoyi.user.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.support.Convert;
import com.ruoyi.user.domain.VerifyCode;
import com.ruoyi.user.mapper.VerifyCodeMapper;

/**
 * 手机短信验证码 服务层实现
 * 
 * @author ruoyi
 * @date 2018-12-14
 */
@Service
public class VerifyCodeServiceImpl implements IVerifyCodeService 
{
	@Autowired
	private VerifyCodeMapper verifyCodeMapper;

	/**
     * 查询手机短信验证码信息
     * 
     * @param id 手机短信验证码ID
     * @return 手机短信验证码信息
     */
    @Override
	public VerifyCode selectVerifyCodeById(Long id)
	{
	    return verifyCodeMapper.selectVerifyCodeById(id);
	}
	
	/**
     * 查询手机短信验证码列表
     * 
     * @param verifyCode 手机短信验证码信息
     * @return 手机短信验证码集合
     */
	@Override
	public List<VerifyCode> selectVerifyCodeList(VerifyCode verifyCode)
	{
	    return verifyCodeMapper.selectVerifyCodeList(verifyCode);
	}
	
    /**
     * 新增手机短信验证码
     * 
     * @param verifyCode 手机短信验证码信息
     * @return 结果
     */
	@Override
	public int insertVerifyCode(VerifyCode verifyCode)
	{
	    return verifyCodeMapper.insertVerifyCode(verifyCode);
	}
	
	/**
     * 修改手机短信验证码
     * 
     * @param verifyCode 手机短信验证码信息
     * @return 结果
     */
	@Override
	public int updateVerifyCode(VerifyCode verifyCode)
	{
	    return verifyCodeMapper.updateVerifyCode(verifyCode);
	}

	/**
     * 删除手机短信验证码对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteVerifyCodeByIds(String ids)
	{
		return verifyCodeMapper.deleteVerifyCodeByIds(Convert.toStrArray(ids));
	}
	
}
